<template>
  <div class="welcome-container">
    <div class="welcome-content">
      <h1>欢迎使用编程助手</h1>
      <div class="quick-start">
        <h3>🚀 快速开始</h3>
        <ul>
          <li>从左侧文件树中选择文件</li>
          <li>在下方输入框中向AI助手提问</li>
          <li>使用编辑器查看和编辑代码</li>
        </ul>
      </div>
      <div class="keyboard-shortcuts">
        <h3>⌨️ 快捷键提示</h3>
        <div class="shortcut-grid">
          <div class="shortcut">
            <span class="key">Ctrl + S</span>
            <span class="desc">保存文件</span>
          </div>
          <div class="shortcut">
            <span class="key">Ctrl + F</span>
            <span class="desc">查找</span>
          </div>
          <div class="shortcut">
            <span class="key">Ctrl + `</span>
            <span class="desc">打开终端</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<style scoped>
.welcome-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #1e1e1e;
  color: #d4d4d4;
  user-select: none;
}

.welcome-content {
  max-width: 600px;
  padding: 2rem;
}

h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #fff;
}

.quick-start {
  margin-bottom: 2rem;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #fff;
}

ul {
  list-style: none;
  padding-left: 1rem;
}

li {
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
}

li::before {
  content: "→";
  margin-right: 0.5rem;
  color: #0078d4;
}

.keyboard-shortcuts {
  border-top: 1px solid #404040;
  padding-top: 2rem;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.shortcut {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.key {
  background-color: #2d2d2d;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid #404040;
  font-family: monospace;
  min-width: 80px;
  text-align: center;
}

.desc {
  color: #d4d4d4;
}
</style>
